gdk-win32: Clean Up A Bit
authorChun-wei Fan <fanchunwei@src.gnome.org>
Wed, 15 Apr 2015 09:17:06 +0000 (17:17 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 17 Apr 2015 03:32:16 +0000 (11:32 +0800)
As GLib dropped Windows 2000 support some time ago [1][2], and the current
git master already depends on a GLib release that is well after it dropped
Windows 2000 support, clean up the code a bit as we are assured that the
code will run on XP and later, plus, we have dropped XP support during
this cycle with commit b85f0cc.

https://bugzilla.gnome.org/show_bug.cgi?id=741849

[1]: https://git.gnome.org/browse/glib/commit/?id=80c24d36f2525d83e458ebbdf62fdbd085945a02
[2]: https://git.gnome.org/browse/glib/commit/?id=731b46990896665a8107535080bb075a6e18b6f7

gdk/win32/gdkcursor-win32.c
gdk/win32/gdkwindow-win32.c

index 28b274526629051a4a7561aee07ceee5888db0e2..eb4a4542286a335425795c54301d076c104e0e30 100644 (file)
@@ -821,22 +821,7 @@ _gdk_win32_pixbuf_to_hcursor (GdkPixbuf *pixbuf,
 gboolean
 _gdk_win32_pixbuf_to_hicon_supports_alpha (void)
 {
-  static gboolean is_win_xp=FALSE, is_win_xp_checked=FALSE;
-
-  if (!is_win_xp_checked)
-    {
-      OSVERSIONINFO version;
-
-      is_win_xp_checked = TRUE;
-
-      memset (&version, 0, sizeof (version));
-      version.dwOSVersionInfoSize = sizeof (version);
-      is_win_xp = GetVersionEx (&version)
-       && version.dwPlatformId == VER_PLATFORM_WIN32_NT
-       && (version.dwMajorVersion > 5
-           || (version.dwMajorVersion == 5 && version.dwMinorVersion >= 1));
-    }
-  return is_win_xp;
+  return TRUE;
 }
 
 HICON
index 3e568a4a998c0e0ff21c7337b5641ce5d0ff3947..da85ded5e23592e2d61f5c27ab000e0f5b7c5aac 100644 (file)
@@ -375,12 +375,8 @@ RegisterGdkClass (GdkWindowType wtype, GdkWindowTypeHint wtype_hint)
             {
               wcl.lpszClassName = L"gdkWindowTempShadow";
               wcl.style |= CS_SAVEBITS;
-              if (LOBYTE (g_win32_get_windows_version()) > 0x05 ||
-                 LOWORD (g_win32_get_windows_version()) == 0x0105)
-               {
-                 /* Windows XP (5.1) or above */
-                 wcl.style |= 0x00020000; /* CS_DROPSHADOW */
-               }
+              wcl.style |= 0x00020000; /* CS_DROPSHADOW */
+
               ONCE_PER_CLASS ();
               klassTEMPSHADOW = RegisterClassExW (&wcl);
             }